#ifndef ENSOBST_INCLUDED
#define ENSOBST_INCLUDED

#include "obstacle.h"
#include <vector>

class EnsObst
{
private:
	std::vector<Obstacle*> Tab;
public:
	//Constructeur/destructeur
	EnsObst();
	~EnsObst();
	
	//iterateur
	typedef std::vector<Obstacle*>::iterator iterator; 
	iterator begin();
	iterator end();

	// Fonctions diverses
	EnsObst& operator()(Obstacle* nouv);
	EnsObst& vider();
	EnsObst& supprimer(EnsObst::iterator it);

	//Gets
	Obstacle& Get(EnsObst::iterator it);
};

inline Obstacle& EnsObst::Get(EnsObst::iterator it)
{
	return **it;
}

inline EnsObst::iterator EnsObst::begin()
{
	return Tab.begin();
}

inline EnsObst::iterator EnsObst::end()
{
	return Tab.end();
}

#endif